package priv.ln.encapsulation.exer3;

/**
 * ClassName: Employee
 * Package: priv.ln.encapsulation.exer3
 * Description:
 *- 包含属性：姓名、性别、年龄、电话，属性私有化
 *
 * - 提供get/set方法
 *
 * - 提供String getInfo()方法
 * @Author 辣辣
 * @Create 2024/6/21 17:13
 * @Version 1.0
 */
public class Employee {
    private String name;
    private char gender;
    private int age;
    private String phoneNumber;

    public void setName(String n){
        name = n;
    }

    public String getName(){
        return name;
    }

    public void setGender(char g){
        gender = g;
    }

    public char getGender(){
        return gender;
    }

    public void setAge(int a){
        age = a;
    }

    public int getAge(){
        return age;
    }

    public void setPhoneNumber(String n){
        phoneNumber = n;
    }

    public String getPhoneNumber(){
        return phoneNumber;
    }

    public String getInfo(){
        return name + "\t" + gender + "\t" + age + "\t"
                + phoneNumber;
    }
}
